export default function (opt = {}) {
    console.log(opt);
    return {
        xAxis: {
            type: 'category',
            data: opt.xAxis || []
        },
        yAxis: {
            name: '金额/元',
            type: 'log',
            max: function (value) {
                let Yvalue = 1;
                let max = value.max;
                while(max>1){
                    max = max /10;
                    Yvalue = Yvalue *10;
                }
                return Yvalue;
            }
        },
        tooltip: {
            trigger: 'axis',
            formatter: '{b} {c}元',
            borderColor:'#ec9536'
        },
        color: '#ec9536',
        series: [
            {
                data: opt.data || [],
                type: 'bar',
                showBackground: true,
                backgroundStyle: {
                    color: 'rgba(180, 180, 180, 0.2)'
                }
            }
        ]
    }
}